import request from '../utils/http';
const service  = import.meta.env.VITE_APP_BASE_URL
const prefix = service + '/taskBi/visual/'



// 根据用户ID获取视角列表
export function getTaskByLoginUser() {
    return request({
        url: prefix + 'getTaskByLoginUser',
        method: 'get',
    })
}
// 新增视角
export function addVisual(data:any) {
    return request({
        url: service + '/taskBi/visual',
        method: 'post',
        data
    })
}
// 删除视角
export function deleteVisual(data:any) {
    return request({
        url: service + '/taskBi/visual/' + data,
        method: 'DELETE',
        data
    })
}
// 获取gant图数据
export function getTaskVisualDetail(params: any) {
    return request({
        url: prefix + 'getTaskVisualDetail',
        method: 'get',
        params
    })
}
// 一键溯源相关【查看】
export function getCodeInfo(params: any) {
    return request({
        url: prefix + 'getCodeInfo',
        method: 'get',
        params
    })
}
// 获取订单统计数量
export function getWorkOrderCount(params: any) {
    return request({
        url: prefix + 'getWorkOrderCount',
        method: 'get',
        params
    })
}

// 获取所有主任务单
export function getAllMainWorkOrder(params:any) {
    return request({
        url: prefix + 'getAllMainWorkOrder',
        method: 'get',
        params
    })
}
// 获取单任务单的详细信息
export function getStatisticList(params: any) {
    return request({
        url: prefix + 'getStatisticList',
        method: 'get',
        params
    })
}